package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.core.base.entity.Entity;
import com.eastfair.venuebooking.enumeration.ExhibitionExhibitionTypeEnum;
import com.eastfair.venuebooking.enumeration.ExhibitionIndustryEnum;
import com.eastfair.venuebooking.enumeration.ExhibitionStateEnum;
import com.eastfair.venueservice.enumeration.ExhibitionManageExhibitionTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

/**
 * <p>
 * 实体类
 * 综合服务展会
 * </p>
 *
 * @author linan
 * @since 2023-04-04
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("vsm_exhibition_manage")
@ApiModel(value = "ExhibitionManage", description = "综合服务展会")
@AllArgsConstructor
public class ExhibitionManage extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 场馆展会id
     */
    @ApiModelProperty(value = "场馆展会id")
    @TableField(value = "vb_exhibition_id")
    @Excel(name = "场馆展会id")
    private Long vbExhibitionId;

    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 展会编号
     */
    @ApiModelProperty(value = "展会编号")
    @Size(max = 64, message = "展会编号长度不能超过64")
    @TableField(value = "exhibition_no", condition = LIKE)
    @Excel(name = "展会编号")
    private String exhibitionNo;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 255, message = "展会名称长度不能超过255")
    @TableField(value = "exhibition_name", condition = LIKE)
    @Excel(name = "展会名称")
    private String exhibitionName;

    /**
     * 展览开始时间
     */
    @ApiModelProperty(value = "展览开始时间")
    @TableField(value = "exhibition_start_time")
    @Excel(name = "展览开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime exhibitionStartTime;

    /**
     * 展览结束时间
     */
    @ApiModelProperty(value = "展览结束时间")
    @TableField(value = "exhibition_end_time")
    @Excel(name = "展览结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime exhibitionEndTime;

    /**
     * 布展开始时间
     */
    @ApiModelProperty(value = "布展开始时间")
    @TableField(value = "arrangement_start_time")
    @Excel(name = "布展开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime arrangementStartTime;

    /**
     * 布展结束时间
     */
    @ApiModelProperty(value = "布展结束时间")
    @TableField(value = "arrangement_end_time")
    @Excel(name = "布展结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime arrangementEndTime;

    /**
     * 撤展开始时间
     */
    @ApiModelProperty(value = "撤展开始时间")
    @TableField(value = "dismantling_start_time")
    @Excel(name = "撤展开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime dismantlingStartTime;

    /**
     * 撤展结束时间
     */
    @ApiModelProperty(value = "撤展结束时间")
    @TableField(value = "dismantling_end_time")
    @Excel(name = "撤展结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime dismantlingEndTime;

    /**
     * 展前折扣开始时间
     */
    @ApiModelProperty(value = "展前折扣开始时间")
    @TableField(value = "pre_discount_start_time")
    @Excel(name = "展前折扣开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime preDiscountStartTime;

    /**
     * 展前折扣结束时间
     */
    @ApiModelProperty(value = "展前折扣结束时间")
    @TableField(value = "pre_discount_end_time")
    @Excel(name = "展前折扣结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime preDiscountEndTime;

    /**
     * 现场折扣开始时间
     */
    @ApiModelProperty(value = "现场折扣开始时间")
    @TableField(value = "on_discount_start_time")
    @Excel(name = "现场折扣开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime onDiscountStartTime;

    /**
     * 现场折扣结束时间
     */
    @ApiModelProperty(value = "现场折扣结束时间")
    @TableField(value = "on_discount_end_time")
    @Excel(name = "现场折扣结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime onDiscountEndTime;

    /**
     * 展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}
     * EXHIBITION_MANAGE_TYPE
     */
    @ApiModelProperty(value = "展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}")
    @TableField(value = "exhibition_type")
    @Excel(name = "展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}", replace = {"自办展_SELF_EXHIBITION", "客展_GUEST_EXHIBITION",  "_null"})
    private ExhibitionManageExhibitionTypeEnum exhibitionType;

    /**
     * 所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}
     */
    @ApiModelProperty(value = "所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}")
    @TableField(value = "industry")
    @Excel(name = "所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}", replace = {"农林渔牧_INDUSTRY_ONE", "工业智造_INDUSTRY_TWO", "新兴产业_INDUSTRY_THREE", "美好生活_INDUSTRY_FOUR", "其他_OTHER",  "_null"})
    private ExhibitionIndustryEnum industry;

    /**
     * 中文简称
     */
    @ApiModelProperty(value = "中文简称")
    @Size(max = 255, message = "中文简称长度不能超过255")
    @TableField(value = "exhibition_short_name", condition = LIKE)
    @Excel(name = "中文简称")
    private String exhibitionShortName;

    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称")
    @Size(max = 255, message = "英文名称长度不能超过255")
    @TableField(value = "exhibition_en_name", condition = LIKE)
    @Excel(name = "英文名称")
    private String exhibitionEnName;

    /**
     * 英文简称
     */
    @ApiModelProperty(value = "英文简称")
    @Size(max = 255, message = "英文简称长度不能超过255")
    @TableField(value = "exhibition_en_short_name", condition = LIKE)
    @Excel(name = "英文简称")
    private String exhibitionEnShortName;

    /**
     * 主办
     */
    @ApiModelProperty(value = "主办")
    @Size(max = 255, message = "主办长度不能超过255")
    @TableField(value = "sponsor_name", condition = LIKE)
    @Excel(name = "主办")
    private String sponsorName;

    /**
     * 承办
     */
    @ApiModelProperty(value = "承办")
    @Size(max = 255, message = "承办长度不能超过255")
    @TableField(value = "undertaker_name", condition = LIKE)
    @Excel(name = "承办")
    private String undertakerName;

    /**
     * 预定面积
     */
    @ApiModelProperty(value = "预定面积")
    @TableField(value = "reserve_area")
    @Excel(name = "预定面积")
    private Integer reserveArea;

    /**
     * 预期人数
     */
    @ApiModelProperty(value = "预期人数")
    @TableField(value = "expect_viewer")
    @Excel(name = "预期人数")
    private Integer expectViewer;

    /**
     * logo地址
     */
    @ApiModelProperty(value = "logo地址")
    @Size(max = 255, message = "logo地址长度不能超过255")
    @TableField(value = "logo_url", condition = LIKE)
    @Excel(name = "logo地址")
    private String logoUrl;

    /**
     * 价目表ID
     */
    @ApiModelProperty(value = "价目表ID")
    @TableField(value = "price_list_id")
    @Excel(name = "价目表ID")
    private Long priceListId;

    /**
     * 展会介绍
     */
    @ApiModelProperty(value = "展会介绍")
    @Size(max = 512, message = "展会介绍长度不能超过512")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "展会介绍")
    private String remark;

    /**
     * 官网地址
     */
    @ApiModelProperty(value = "官网地址")
    @Size(max = 255, message = "官网地址长度不能超过255")
    @TableField(value = "exhibition_website", condition = LIKE)
    @Excel(name = "官网地址")
    private String exhibitionWebsite;

    /**
     * 展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}
     */
    @ApiModelProperty(value = "展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}")
    @TableField(value = "state")
    @Excel(name = "展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}", replace = {"无状态_STATE_ONE", "销售商机_STATE_TWO", "报价确认_STATE_THREE", "活动确认_STATE_FOUR", "创立合同_STATE_FIVE", "合同付款_STATE_SIX", "活动结算_STATE_SEVEN", "活动结束_STATE_EIGHT", "其他状态_STATE_NINE",  "_null"})
    private ExhibitionStateEnum state;

    /**
     * 同步状态：1已同步；0未同步
     */
    @ApiModelProperty(value = "同步状态：1已同步；0未同步")
    @TableField(value = "sync_state")
    @Excel(name = "同步状态：1已同步；0未同步")
    private Integer syncState;

    /**
     * 场馆预定展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}
     */
    @ApiModelProperty(value = "场馆预定展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}")
    @TableField(value = "venue_exhibition_type")
    @Excel(name = "场馆预定展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}", replace = {"展会_EXHIBITION", "会议_MEETING", "论坛_FORUM", "其他_OTHER",  "_null"})
    private ExhibitionExhibitionTypeEnum venueExhibitionType;


    @Builder
    public ExhibitionManage(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long vbExhibitionId, Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, 
                    Long tenantId, String exhibitionNo, String exhibitionName, LocalDateTime exhibitionStartTime, LocalDateTime exhibitionEndTime, LocalDateTime arrangementStartTime, 
                    LocalDateTime arrangementEndTime, LocalDateTime dismantlingStartTime, LocalDateTime dismantlingEndTime, LocalDateTime preDiscountStartTime, LocalDateTime preDiscountEndTime, LocalDateTime onDiscountStartTime, 
                    LocalDateTime onDiscountEndTime, ExhibitionManageExhibitionTypeEnum exhibitionType, ExhibitionIndustryEnum industry, String exhibitionShortName, String exhibitionEnName, String exhibitionEnShortName,
                    String sponsorName, String undertakerName, Integer reserveArea, Integer expectViewer, String logoUrl, Long priceListId, 
                    String remark, String exhibitionWebsite, ExhibitionStateEnum state, Integer syncState, ExhibitionExhibitionTypeEnum venueExhibitionType) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.vbExhibitionId = vbExhibitionId;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.exhibitionNo = exhibitionNo;
        this.exhibitionName = exhibitionName;
        this.exhibitionStartTime = exhibitionStartTime;
        this.exhibitionEndTime = exhibitionEndTime;
        this.arrangementStartTime = arrangementStartTime;
        this.arrangementEndTime = arrangementEndTime;
        this.dismantlingStartTime = dismantlingStartTime;
        this.dismantlingEndTime = dismantlingEndTime;
        this.preDiscountStartTime = preDiscountStartTime;
        this.preDiscountEndTime = preDiscountEndTime;
        this.onDiscountStartTime = onDiscountStartTime;
        this.onDiscountEndTime = onDiscountEndTime;
        this.exhibitionType = exhibitionType;
        this.industry = industry;
        this.exhibitionShortName = exhibitionShortName;
        this.exhibitionEnName = exhibitionEnName;
        this.exhibitionEnShortName = exhibitionEnShortName;
        this.sponsorName = sponsorName;
        this.undertakerName = undertakerName;
        this.reserveArea = reserveArea;
        this.expectViewer = expectViewer;
        this.logoUrl = logoUrl;
        this.priceListId = priceListId;
        this.remark = remark;
        this.exhibitionWebsite = exhibitionWebsite;
        this.state = state;
        this.syncState = syncState;
        this.venueExhibitionType = venueExhibitionType;
    }

}
